<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>使用v-model结合v-for指令选择用户等级</title>
<!--引入Vue库-->
<script src="vue.js"></script>
</head>
<body>	
<div id="app">
  <p>设置用户等级：</p>
  <select v-model="selected">
      <option v-for="option in options" :value="option.value">
          {{ option.text }}
      </option>
  </select>
   <p>用户等级为: {{ selected }}</p>
</div>
<script>
  var vm=new Vue({ 
      el: "#app",
      data: {
         selected: 'A' ,
         options: [
             { text: '一级用户', value: 'A' },
             { text: '二级用户', value: 'B' },
             { text: '三级用户', value: 'C' }
            ]
        }
     })
</script>
</body>
</html>
